<%--
  Created by IntelliJ IDEA.
  User: MF
  Date: 2021/2/5
  Time: 10:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s"  uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="keys" content="">
    <meta name="author" content="">
    <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="css/font-awesome.min.css">
    <div class="page-header">
        <h1>用户列表 <small>Subtext for header</small></h1>
    </div>
</head>
<body>
<%--<div class="navbar-header">--%>
<%--    <div>--%>
<%--        <a class="navbar-brand" href="register.jsp" style="font-size:32px;">注册</a>--%>
<%--        <button type="button" class="btn btn-primary" href="register.jsp">注册</button>--%>
<%--    </div>--%>
<%--</div>--%>
<table class="table table-striped">
    <tr >
        <th></th>
        <th>ename</th>
        <th>job</th>
        <th>mgr</th>
        <th>sal</th>
        <th>op</th>
    </tr>
    <s:iterator value="#session.empList" var="emp" >
        <tr >
            <td><s:property value="index"/></td>
            <td><s:property value="#emp.ename"/></td>
            <td><s:property value="#emp.job"/></td>
            <td><s:property value="#emp.mgr"/></td>
            <td><s:property value="#emp.sal"/></td>
            <td><a href="update.jsp?empno=<s:property value="#emp.empno"/>&ename=<s:property value="#emp.ename"/>&job=<s:property value="#emp.job"/>&sal=<s:property value="#emp.sal"/>"/><button>修改</button></a>
                &nbsp;&nbsp;&nbsp;&nbsp;
                <a href="deleteEmp?empno=<s:property value="#emp.empno"/>"><button>删除</button></a></td>
        </tr>
    </s:iterator>
</table>
</body>
</html>
<script src="jquery/jquery-2.1.1.min.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<script src="layer/layer.js"></script>
<script>

    $(function () {
        list();
    })
    function list(){
        $.ajax({
            url:"findAll",
            type:"GET",
            success:function (empList){

            }
        });
    }



</script>